package com.fast.cron.db.dao;

import com.fast.cron.db.entry.Events;

import java.sql.SQLException;
import java.util.List;

/**
 * @author: Leo Jie
 * @date: 2018-10-04 20:20
 * @version: v1.0
 */
public interface EventsDao {
    /**
     * add event
     *
     * @param event obj of event
     * @return row number of result
     * @throws SQLException the error when execute sql
     */
    long recordEvent(Events event) throws SQLException;

    /**
     * list events
     *
     * @return list events result
     * @throws SQLException the error when execute sql
     */
    List<Events> listEvents() throws SQLException;
}
